Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use cuda with onnx if available #146

Merged
merged 1 commit into from
Nov 4, 2024
Merged

use cuda with onnx if available #146

merged 1 commit into from
Nov 4, 2024

Conversation

nateraw
Copy link
Contributor

@nateraw nateraw commented Oct 23, 2024

Resolves #145

Here, we check if CUDA provider is available, and if so, we prepend it to the providers used to initialize the ort session. I believe you'd need onnxruntime-gpu installed for this to work properly, so it shouldn't have any effect otherwise.

Can try it out in Colab here: https://gist.github.com/nateraw/3fc03dda5b78f0ca08acb15b9882dfe8

Quick first pass, let me know if there's anything I'm missing 😄

Copy link
Member

@psobot psobot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me - thanks @nateraw!

@psobot psobot merged commit 53f6738 into spotify:main Nov 4, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GPU inference with ONNX
2 participants